package com.qf.springmvc.controller;

import com.qf.springmvc.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 钻五大人
 * @date 2022/5/3 14:48
 */
@Controller
@RequestMapping("/ajax")
public class AjaxController {

//    @RequestMapping(value = "test1",produces = "text/html;charset=utf-8")
    @RequestMapping(value = "test1")
    @ResponseBody
    public User test1(@RequestBody User user){
        System.out.println(user);
//        return "发送成功了";
        return user;
    }
}
